<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	function formBack(json) {
        if (json.code == BJUI.statusCode.success) {
            $(this).alertmsg('ok', '添加成功！')
            $(this).navtab('refresh');
            $(this).dialog('closeCurrent');
        }else {
            $(this).alertmsg('error', '添加失败！')
		}
    }
</script>
<form action="role/addSubmit.shtml" class="pageForm"
	  data-toggle="validate" data-callback="formBack"
	  method="post" id="addForm" data-toggle="ajaxform">
	<div class="bjui-pageContent">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="row" style="text-align: center;">
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label x180">角色名称：</label>
							<input type="text" name="name" id="name" class="form-control" data-rule="required;length[~20]" style="width: 200px;"/><font color="red">*</font>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label x180">角色类型：</label><select name="type" id="roleType"
								data-width="200" class="form-control" data-toggle="selectpicker" data-rule="required;">
							<c:forEach items="${roleTypes}" var="roleType">
								<option value="${roleType.id}">${roleType.name}</option>
							</c:forEach>
							</select><font color="red">*</font>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label x180">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</label>
							<textarea rows="3" cols="20" id="remark" name="remark" data-rule="length[~50]"></textarea>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="bjui-pageFooter">
		<ul>
			<li><button type="submit" class="btn-primary">提交</button></li>
			<li><button type="button" class="btn-close">关闭</button></li>
		</ul>
	</div>
</form>